#include<bits/stdc++.h>
using namespace std;
int main(void){
	stack<char>s;
	int i,j = 0;
	int count[1000] = {0};
	char a1[1000],a2[1000];
	gets(a1);
	gets(a2);
	for(i = 0;a1[i];i++){
		if(a1[i]==a2[j]){
			s.push(a1[i]);
			s.pop();
			count[i] = 1;
			j++;
		}
		else {
			s.push(a1[i]);
			count[i] = 2;
		}
	}
	//cout<<s.top();
	while(!s.empty()){
		if(s.top() == a2[j]){
		s.pop();
		count[i] = 3;
		i++;
		j++;
		}
		else {
			cout<<"Are you kidding me?";return 0;
		}
	}
	if(!s.empty()) {
		cout<<"Are you kidding me?";return 0;
	}
	else for(i = 0;count[i]!=0;i++){
		if(count[i] == 1)cout<<"1->2"<<endl;
		else if(count[i] == 2)cout<<"1->3"<<endl;
		else cout<<"3->2"<<endl;
	}
	return 0;
}
